home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: mchamp@ix.netcom.com (Michael Champagne)
- Newsgroups: comp.lang.c++
- Subject: Braces and Inline Assembly?
- Date: Sat, 03 Feb 1996 00:50:39 GMT
- Organization: Netcom
- Message-ID: <4eubgp$6ui@ixnews6.ix.netcom.com>
- NNTP-Posting-Host: ix-dfw11-17.ix.netcom.com
- X-NETCOM-Date: Fri Feb 02 4:50:33 PM PST 1996
- X-Newsreader: Forte Free Agent 1.0.82
-
- Ok.. I'm new to using inline assembly and I was wondering why this
- compiles:
-
- void set_mode(const int mode)
- {
- asm {
- mov AH, 0;
- mov AL, byte ptr mode;
- int 10h;
- }
- }
-
- and this doesn't..
-
- void set_mode(const int mode)
- {
- asm
- {
- mov AH, 0;
- mov AL, byte ptr mode;
- int 10h;
- }
- }
-
- Seems like it's the exact same code.. does the placement of the
- braces matter when using the 'asm' statement? In the second one the
- compiler doesn't recognize the 'mov' and says there needs to be a
- couple of semicolons stuck in there.
-
- Thanks in advance,
-
- Mike
-
-
-